﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using Mysqlx.Crud;

namespace OrderManagementAPI.Models
{
    public class OrderDetail
    {
        public int Id { get; set; }
        public string ProductName { get; set; }
        public int Quantity { get; set; }
        public decimal Price { get; set; }

        [NotMapped]
        public decimal Subtotal => Quantity * Price;

        public int OrderId { get; set; }
        public Order Order { get; set; }
    }
}
